package database.util;

import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableModel;

public class TablaPersonajes extends JTable{

	private static final long serialVersionUID = 2575311666541025888L;
	public void setModel(TableModel tmodel){
		if(tmodel instanceof ModeloTablaPersonajes) super.setModel(tmodel);
		else throw new IncompatibleClassChangeError();
	}
	public ModeloTablaPersonajes getModeloTablaPersonajes(){
		return (ModeloTablaPersonajes) getModel();
	}
	public TablaPersonajes(ModeloTablaPersonajes modelo){
		super(modelo);
		setRowHeight(100);
		setOpaque(false);
		String [] nombresCol= { "Pic", "Name", "Cost", "Habi.", "Cost SP", "Attack", "Def",
				"Magi", "Res", "Speed", "Jump", "SP", "HP"};
		getColumn(nombresCol[0]).setPreferredWidth(100);
	}
}
